while(require(dplyr) == FALSE<caret>){
# do something
}